/*
 * state.h
 *
 *  Created on: 2012-10-30
 *      Author: maciek
 */

#ifndef STATE_H_
#define STATE_H_
using namespace std;

#include <complex>
#include <vector>
#include <QMetaProperty>
#include <QString>
#include <iostream>

/* TODO: Paweł */
class state {
  Q_GADGET
  Q_ENUMS(loadState)
  //Q_PROPERTY(loadState load READ getLoadState);
public:
	enum loadState
	{
		_fetchState,
		_loadState,
		_outState,
		_finishedState,
		_stopState,
		_resumeState,
		_blockedState
	};
	state();
	virtual 							~state( void );
	void 								setState( const complex<double> &Position,
												   const complex<double> &ReservedPosition,
												   const int &CommType);
	const state& 						returnState( void );
	void								setPosition( const complex<double> &Position );
	const complex<double> & 			getPosition( void );
	void								setReservedPosition( const complex<double> &ReservedPosition);
	const complex<double> &				getReservedPosition( void );
	int 								getCommunicationType( void );
	void								setCommunicationType( const int &commType );
	loadState 							getLoadState( void );
	QString enumToString(loadState state);
	QString 							QGetLoadState( void );
	void								setLoadState(const state::loadState &LState );
	loadState 							getLastState( void );
QString 							QGetLastState( void );
	void								setLastState(const state::loadState &LState );
private:
	complex<double>		 		_position;
	complex<double>				_reservedPosition;
	int 						_communicationType;
	loadState 					_load;
	loadState					_lastState;
};

#endif /* STATE_H_ */
